<%@page language="java"%>
<%@page contentType="text/html"%>
<%@page import="java.util.*, descriptor.*"%>

<jsp:include page="admin_generic_pre.jsp" >
	<jsp:param name="pagesubtitle" value="Administrators list" />
</jsp:include>


	<p>
		<jsp:useBean id="infos" class="java.lang.String" scope="request" />
		<%= infos %>
	</p>
	<p>
		<jsp:useBean id="allAdmins" class="descriptor.AdminsListDescriptor" scope="request" />
		<form method="POST" action="admin">
		<table>
			<thead>
				<tr><th>Login</th><th>Firstname</th><th>Name</th><th>Email</th><th>Select</th></tr>
			</thead>
			<tbody>
				<%
					for (AdminDescriptor ad : allAdmins.getAdminDescriptors()) {
				%>
					<tr><td><a href="admin?action=admins_createupdate&id=<%= ad.getId() %>" ><%=  ad.getLogin() %></a></td><td><%=  ad.getFirstName() %></td><td><%=  ad.getSurName() %></td><td><%=  ad.getEmail() %></td><td><input type="checkbox" name="admin_<%= ad.getId() %>" /></td></tr>
				<%
					}
				%>
			</tbody>
		</table>
		<p><input type="submit" name="button_delete" value="Delete" /></p>
		<input type="hidden" name="action" value="admins_modify" />
		</form>
	</p>
	
<jsp:include page="admin_generic_post.jsp" ></jsp:include>		